﻿namespace Baggr.FeedParser.Atom
{
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Xml.Serialization;

    /// <summary>
    /// The text type.
    /// </summary>
    /// <remarks>
    /// </remarks>
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(Namespace = "http://www.w3.org/2005/Atom")]
    public class AtomText
    {
        /// <summary>
        /// Containing text;
        /// </summary>
        [XmlText]
        public string Text { get; set; }

        /// <summary>
        /// Type of text.
        /// </summary>
        [XmlAttribute("type")]
        public AtomTextTypes Type { get; set; }

        /// <summary>
        /// String presentation of instance.
        /// </summary>
        /// <returns>Value of Text</returns>
        public override string ToString()
        {
            return Text;
        }
    }
}
